package com.wanna.common.controller;

import com.wanna.common.doc.annotation.ApiInterface;
import com.wanna.common.doc.annotation.ApiMethod;
import com.wanna.common.doc.annotation.ApiParam;
import com.wanna.common.lang.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * 分析统一接口控制器
 *
 * @author wanna
 * @time 2018-5-17
 */
@RestController
@RequestMapping("/analysis")
@ApiInterface(name = "日志分析接口")
public class AnalysisController {

//    @GetMapping("/{start}/{end}")
//    @ApiMethod(name = "日志分析", path = "/analysis/{start}/{end}", returnClass = ReportParameters.class)
//    public Result analysisCustomizePeriodData(@PathVariable("start") @ApiParam(name = "start", description = "字符串形式的开始时间", paramClass = String.class,collectionType = true) String start,
//                                              @PathVariable("end") @ApiParam(name = "end", description = "字符串形式的结束时间") String end) {
//
//        return Result.success("");
//    }

    @GetMapping("/report")
    @ApiMethod(name = "获取报表数据", path = "/report")
    public Result report(@ApiParam(name = "parameters", paramClass = ReportParameters.class, description = "json参数") ReportParameters parameters) {
        return Result.success(new HashMap<>());
    }
}
